package top.fullj.actor;

import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;

/**
 * arguments for Actor creation
 *
 * @author wurenhai
 * @since 2018/3/11
 */
public class Props implements Iterable<Object> {

    public static Props NONE = new Props();

    public static Props with(Object...args) {
        return new Props(args);
    }

    private final Collection<Object> values;

    private Props(Object...args) {
        this.values = Arrays.asList(args);
    }

    public int getCount() {
        return values.size();
    }

    @Override
    public Iterator<Object> iterator() {
        return values.iterator();
    }

}
